package Decorator;

public class Fruit extends Decorating{

    public Fruit(IBirthdayCake birthdayCake) {
        super(birthdayCake);
    }

    public Fruit(Decorating decoratingCake) {
        super(decoratingCake);
        this.decorating = decoratingCake.decorating;
    }

    public void putFruit()
    {
        System.out.println("putting fruit...");
        if(decorating.isEmpty())
            decorating += "fruit";
        else
            decorating += ",fruit";
    }

    @Override
    public void show() {
        System.out.println("cake with " + decorating);
    }
}
